//
//  YBBurnAfterReadingCell.m
//  yibeilive
//
//  Created by 南无本师释迦牟尼佛 on 2023/2/19.
//

#import "YBBurnAfterReadingCell.h"

@implementation YBBurnAfterReadingCell

// 初始化控件
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _picImgV = UIImageView.new;
        _picImgV.image = [UIImage imageNamed:@"msg_bubble_burn_after_reading"];
        [self.container addSubview:_picImgV];
    }
    return self;
}

// 根据 cellData 绘制 cell
- (void)fillWithData:(YBBurnAfterReadingCellData *)data {
    [super fillWithData:data];

    self.customData = data;
}

// 设置控件坐标
- (void)layoutSubviews {
    [super layoutSubviews];
    
    if (self.customData.direction==MsgDirectionIncoming) {
        self.picImgV.mm_width(self.container.mm_w).mm_height(self.container.mm_h).mm_top(0).mm_right(0);
    }else{
        self.picImgV.mm_width(self.container.mm_w).mm_height(self.container.mm_h).mm_top(0).mm_left(0);
    }
}

@end
